<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateKdClassicCasesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('kd_classic_cases', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->comment('创建者');
            $table->string('title')->comment('标题');
            $table->string('thumb')->comment('展示图片');
            $table->text('detailed_desc')->comment('详细介绍');
            $table->integer('sort')->default(0)->comment('排序');
            $table->tinyInteger('is_show')->default(1)->comment('1显示,-1隐藏');
//            $table->text('measuring_pic')->nullable()->comment('量尺照片');
//            $table->text('design_pic')->nullable()->comment('设计图片');
//            $table->text('scene_pic')->nullable()->comment('安装实景');
            $table->string('electronic_photo_album')->nullable()->comment('电子相册');
            $table->integer('like_count')->default(100)->comment('点赞数');
            $table->integer('view_count')->default(100)->comment('点击数');
            $table->integer('share_count')->default(100)->comment('分享数');
            $table->integer('remark_count')->default(0)->comment('评论数');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('kd_classic_cases');
    }
}
